#include <cstdio>
#include <algorithm>

using namespace std;

const int maxn=100;
struct Point { int x, y, id; } p[maxn+1];
int n, d, ans[maxn+1], now[maxn+1];

int sqr(int x) {return x*x;}

bool check(Point a, Point b) {
	return sqr(a.x-b.x)+sqr(a.y-b.y)<=sqr(d);
}

int main() {
#ifdef DEBUG
	freopen("src.in", "r", stdin);
	freopen("src.out", "w", stdout);
#endif

	scanf("%d %d", &n, &d);
	for (int i=1; i<=n; i++) {
		scanf("%d %d", &p[i].x, &p[i].y);
		p[i].id = i;
	}

	for (int i=1; i<=maxn; i++) {
		random_shuffle(p+1, p+n+1);
		now[0] = 0;
		for (int j=1; j<=n; j++) {
			bool flag=true;
			for (int k=1; k<=now[0] && flag; k++) {
				flag = check(p[now[k]], p[j]);
			}
			if (flag) now[++now[0]] = j;
		}

		if (now[0]>ans[0]) {
			ans[0] = now[0];
			for (int i=1; i<=now[0]; i++) {
				ans[i] = p[now[i]].id;
			}
		}
	}

	printf("%d\n", ans[0]);
	for (int i=1; i<=ans[0]; i++) printf("%d ", ans[i]);
	printf("\n");

	fclose(stdin);
	fclose(stdout);
	return 0;
}
